<template>
    <!-- 抽屉组件 -->
    <Xcmg-drawer class="chatDrawer" v-model="_visible" :title="title" hideFooter size="648px">
        <div>
            <AIChat />
        </div>
    </Xcmg-drawer>
</template>

<script lang="ts" setup>
import { ref, computed, } from 'vue'
import AIChat from '@/components/AIchat.vue'

// 定义props
const props = defineProps<{
    title: string;
    visible: boolean,
}>();

// 定义emits
const emit = defineEmits(['update:visible',]);

// 计算属性控制抽屉显示/隐藏
const _visible = computed({
    get() {
        return props.visible;
    },
    set(val) {
        emit('update:visible', val);
    },
});

</script>

<style scoped lang="less"></style>